unit UfrmProviderBrowse;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UfrmStandarBrowse, DB, ActnList, RzPanel, RzButton, ExtCtrls,
  ADODB, DBGridEhGrouping, GridsEh, DBGridEh,UfrmBaseEdit, RzCommon;

type
  TfrmProviderBrowse = class(TfrmStandarBrowse)
    qryProvider: TADOQuery;
    DBGridEh1: TDBGridEh;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  protected
    function GetEditParams:Variant;override;
    function CreateEditForm:TfrmBaseEdit;override;
    procedure IniReportDataSet;override;
  public
    { Public declarations }
  end;

var
  frmProviderBrowse: TfrmProviderBrowse;

implementation

uses UdataMoudule,UfrmProviderEdit;

{$R *.dfm}


function TfrmProviderBrowse.CreateEditForm: TfrmBaseEdit;
begin
   Result:=TfrmProviderEdit.Create(self);
end;

procedure TfrmProviderBrowse.FormCreate(Sender: TObject);
begin
  inherited;
  qryProvider.Active:=true;
end;

function TfrmProviderBrowse.GetEditParams: Variant;
begin
     Result:= DataSet.FieldByName('clientid').AsInteger;
end;

procedure TfrmProviderBrowse.IniReportDataSet;
begin
  inherited;
   ReportDataSetList.Clear;
  ReportDataSetList.AddObject(qryProvider.Name,qryProvider);

end;

initialization
    RegisterClass(TfrmProviderBrowse);
 finalization
    UnRegisterClass(TfrmProviderBrowse);
end.
